<script type="text/html" data-help-name="ADC">
  <p>ADC节点: 将从引脚采集到的模拟信号量转化为数字信号量</p>
</script>


<script type="text/html" data-template-name="ADC">

  <div class="form-row">
    <label for="node-input-name"><i class="fa fa-tag"></i> 名称</label>
    <input type="text" id="node-input-name" data-i18n="[placeholder]name">
  </div>


  <div class="form-row">
    <label for="node-input-pin"><i class="fa fa-circle"></i> Pin</label>
    <select id="node-input-pin" style="width: 250px;">
      <option value="0">ADC0</option>
      <option value="2">ADC2</option>
      <option value="3">ADC3</option>
      <option value="4">ADC4</option>
      <option value="5">ADC5</option>
    </select>
  </div>

</script>



<script type="text/javascript">
    RED.nodes.registerType('ADC',{
      category: 'Block 板载外设',
      color: '#35c1f4',
      defaults: {
        name: {value:""},
        pin:  {value:"0", required: true},
      },
      inputs:1,
      outputs:1,
      icon: "font-awesome/fa-angle-double-right",
      label: function() {
        return this.name||this._("ADC节点");
      },
      inputLabels: function(i) {
          return this.name||this._("输入-任意流均可触发");
        },
      outputLabels: function(i) {
      return this.name || this._("输出-对应ADC引脚采集的电压值");
      },
  

    });
  </script>
  
